package com.qiyun.dinghuohui.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.qiyun.dinghuohui.R;
import com.qiyun.dinghuohui.base.BaseActivity;
import com.qiyun.dinghuohui.common.ImageUtils;
import com.qiyun.dinghuohui.utils.Inject;
import com.qiyun.dinghuohui.utils.LogDebug;
import com.qiyun.dinghuohui.utils.ServerResponse;
import com.qiyun.dinghuohui.vo.PublicSelectParamBean;
import com.qiyun.dinghuohui.widget.TouchImageView;
import com.qiyun.dinghuohui.widget.TransformativeImageView;

import org.json.JSONObject;

/**
 * Created by xlm on 2018\6\8 0008
 */

public class BigPictureActivity extends BaseActivity {

    @Inject(R.id.back)
    private RelativeLayout mRelaBack;
    @Inject(R.id.title)
    private TextView mTxtTilte;
    private String imagePath;
    @Inject(R.id.touch_img)
    private TransformativeImageView touchImageView;

    @Override
    protected void onGetIntent(Intent intent) {
        super.onGetIntent(intent);
        if (intent != null) {
            imagePath = intent.getStringExtra("data");
        }
    }

    public static void startActivity(Activity context, String object) {
        Intent intent = new Intent(context, BigPictureActivity.class);
        intent.putExtra("data", object);
        context.startActivity(intent);
    }

    @Override
    protected void onSetContentView() {

        setContentView(R.layout.activity_big_picture);
    }

    @Override
    protected void initViews() {
    }

    @Override
    protected void onSetListener() {
        mRelaBack.setOnClickListener(getThis());
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()) {
            case R.id.back:
                finish();
                break;
        }
    }

    @Override
    protected void afterOnCreate(Bundle savedInstanceState) {
        ImageUtils.showImage(getThis(), touchImageView, imagePath);
    }

    @Override
    public void onPostDataStart() {

    }

    @Override
    public void onPostDataSuccess(ServerResponse response) {

    }

    @Override
    public void onPostDataError(ServerResponse response) {

    }

    @Override
    public void onPostDataComplete(ServerResponse response) {

    }

    @Override
    public void setProgressMessage(String message) {

    }

    @Override
    public void publicSelectCallBack(PublicSelectParamBean pspb) {

    }

}
